<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page import="java.util.List"%>
<%@ page import="com.util.ApplicationUtil"%>
<%@ page import="org.springframework.web.context.WebApplicationContext"%>
<%@ page import="com.application.function.entity.Menu"%>
<%@ page import="com.application.model.entity.Model"%>
<%@ page import="com.application.usertable.entity.Usertable"%>
<%
	String path = request.getContextPath();
	ServletContext sc = request.getSession().getServletContext();
	ApplicationUtil au = new ApplicationUtil();
	Usertable utable = (Usertable) session.getAttribute("loginUser");
	String mid = "0";
	Model m = null;
	List<Menu> fList = null;
	String midtemp = "0";
	boolean flag = false;
	if (request.getParameter("mid") != null && !midtemp.equals("")
			&& !midtemp.equals("12341234")) {
		midtemp = request.getParameter("mid");
		fList = au.getFunctionByMid(midtemp, utable.getId());
	}
%>
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<title>项目管理左侧页面</title>
		<link href="<%=path%>/css/jinmu_style.css" rel="stylesheet"
			type="text/css" />
		<style type="text/css">
body {
	background: #6F8CDE;
}
</style>
		<script>
 function	showMenu(numI){
		if(document.getElementById("menu"+numI).style.display==""){
			document.getElementById("menu"+numI).style.display="none";
			document.getElementById("menuImg"+numI).src="<%=path%>/images/img-3.gif";
		}
		else{
			document.getElementById("menu"+numI).style.display="";
			document.getElementById("menuImg"+numI).src="<%=path%>/images/img-2.gif";
		}
	}
	
</script>
	</head>
	<body style="overflow-x: hidden;">
		<table width="190" border="0" cellspacing="0" cellpadding="0">
			<tr>
				<td class="pad5">
					<%
						if (!midtemp.equals("12341234")) {
					%>
					<%
						if (fList != null) {
								for (int i = 0; i < fList.size(); i++) {
									Menu f = fList.get(i);
					%>
					<table width="100%" border="0" cellspacing="0" cellpadding="0"
						class="margb5">
						<%
							if (f.getLx().equals("f")) {
											if (i == 0) {
												out.println("<script>parent.main.location = '"
														+ path + "/" + f.getUrl()
														+ "'</script>");
											    flag = true;
											}
						%>
						<tr style="cursor: hand">
							<td width="5" class="bgcolor">
								<img src="<%=path%>/images/img-6.gif" width="5" height="23" />
							</td>
							<td width="155" class="bgcolor qlan13b">
								<a href="<%=path%>/<%=f.getUrl()%>" target="rhs"
									onClick="leftWidthSet()"> <%=f.getName()%> </a>
							</td>
							<td width="20" align="center" class="bgcolor">
								<img src="<%=path%>/images/img-4.gif" />
							</td>
							<td width="5" class="bgcolor">
								<img src="<%=path%>/images/img-7.gif" width="5" height="23" />
							</td>
						</tr>
						<%
							} else {
						%>
						<tr onClick="showMenu('<%=i%>');leftWidthSet()"
							style="cursor: hand">
							<td width="5" class="bgcolor">
								<img src="<%=path%>/images/img-6.gif" width="5" height="23" />
							</td>
							<td width="155" class="bgcolor qlan13b">
								<%=f.getName()%>
							</td>
							<td width="20" align="center" class="bgcolor">
								<img id="menuImg2" src="<%=path%>/images/img-2.gif" width="8"
									height="11" />
							</td>
							<td width="5" class="bgcolor">
								<img src="<%=path%>/images/img-7.gif" width="5" height="23" />
							</td>
						</tr>
						<%
							List<Menu> ListS = au.getFunctionByMid(f.getId(),
													utable.getId());
											if (ListS != null && ListS.size() > 0) {
						%>
						<tr>
							<td colspan="4" class="bgcolor">
								<table id="menu<%=i%>" width="100%" border="0" cellspacing="0"
									cellpadding="0" class="bgcolor1" style="display: ">
									<%
										for (int j = 0; j < ListS.size(); j++) {
												Menu fs = ListS.get(j);
												if (j == 0 && !flag) {
												out.println("<script>parent.main.location = '"
														+ path + "/" + fs.getUrl()
														+ "'</script>");
											    }
									%>
									
									<tr>
										<td width="10%" align="center">
											<img src="<%=path%>/images/img-5.gif" width="9" height="9" />
										</td>
										<td width="90%" align="left" class="lan12">
											<a href="<%=path%>/<%=fs.getUrl()%>" target="rhs"
												onClick="leftWidthSet()"> <%=fs.getName()%> </a>
										</td>
									</tr>
									<%
										}
									%>
								</table>
							</td>
						</tr>
						<%
							}
										}
						%>
					</table>
					<%
						}
							}
					%>

					<%
						}
					%>
					<!-- ------------------------- -->
					
					<%
						if (midtemp.equals("12341234")) {
							out.println("<script>parent.main.location = '"+ path + "/baseManage_listBaseData.do?method=listBaseData'</script>");
					%>
					<table width="100%" border="0" cellspacing="0" cellpadding="0"
						class="margb5">
						<tr onClick="showMenu('2');leftWidthSet()" style="cursor: hand">
							<td width="5" class="bgcolor">
								<img src="<%=path%>/images/img-6.gif" width="5" height="23" />
							</td>
							<td width="155" class="bgcolor qlan13b">
								系统管理
							</td>
							<td width="20" align="center" class="bgcolor">
								<img id="menuImg2" src="<%=path%>/images/img-2.gif" width="8"
									height="11" />
							</td>
							<td width="5" class="bgcolor">
								<img src="<%=path%>/images/img-7.gif" width="5" height="23" />
							</td>
						</tr>
						<tr>
							<td colspan="4" class="bgcolor">
								<table id="menu2" width="100%" border="0" cellspacing="0"
									cellpadding="0" class="bgcolor1" style="display: ">
									<tr>
										<td width="10%" align="center">
											<img src="<%=path%>/images/img-5.gif" width="9" height="9" />
										</td>
										<td width="90%" align="left" class="lan12">
											<a
												href="<%=path%>/baseManage_listBaseData.do?method=listBaseData"
												target="rhs" onClick="leftWidthSet()">数据字典</a>
										</td>
									</tr>
									<tr>
										<td width="10%" align="center">
											<img src="<%=path%>/images/img-5.gif" width="9" height="9" />
										</td>
										<td width="90%" align="left" class="lan12">
											<a
												href="<%=path%>/listDepartment.do?method=getDepartmentPartialList&bussType=0"
												target="rhs" onClick="leftWidthSet()">部门管理</a>
										</td>
									</tr>
									<tr>
										<td width="10%" align="center">
											<img src="<%=path%>/images/img-5.gif" width="9" height="9" />
										</td>
										<td width="90%" align="left" class="lan12">
											<a
												href="<%=path%>/listRole.do?method=getRolePartialList&bussType=1"
												target="rhs" onClick="leftWidthSet()">角色管理</a>
										</td>
									</tr>
									<tr>
										<td width="10%" align="center">
											<img src="<%=path%>/images/img-5.gif" width="9" height="9" />
										</td>
										<td width="90%" align="left" class="lan12">
											<a
												href="<%=path%>/listUsertable.do?method=getUsertablePartialList&bussType=2"
												target="rhs" onClick="leftWidthSet()">用户管理</a>
										</td>
									</tr>
									<tr>
										<td width="10%" align="center">
											<img src="<%=path%>/images/img-5.gif" width="9" height="9" />
										</td>
										<td width="90%" align="left" class="lan12">
											<a
												href="<%=path%>/listModel.do?method=getModelPartialList&bussType=2"
												target="rhs" onClick="leftWidthSet()">模块管理</a>
										</td>
									</tr>
									<tr>
										<td width="10%" align="center">
											<img src="<%=path%>/images/img-5.gif" width="9" height="9" />
										</td>
										<td width="90%" align="left" class="lan12">
											<a
												href="<%=path%>/listFunction.do?method=getFunctionPartialList&bussType=2"
												target="rhs" onClick="leftWidthSet()">功能管理</a>
										</td>
									</tr>
									<tr>
										<td width="10%" align="center">
											<img src="<%=path%>/images/img-5.gif" width="9" height="9" />
										</td>
										<td width="90%" align="left" class="lan12">
											<a
												href="<%=path%>/listMac.do?method=getMacPartialList&bussType=2"
												target="rhs" onClick="leftWidthSet()">MAC库管理</a>
										</td>
									</tr>
									<tr>
										<td width="10%" align="center">
											<img src="<%=path%>/images/img-5.gif" width="9" height="9" />
										</td>
										<td width="90%" align="left" class="lan12">
											<a
												href="<%=path%>/listSys.do?method=getSysPartialList&bussType=2"
												target="rhs" onClick="leftWidthSet()">系统配置</a>
										</td>
									</tr>

									<tr>
										<td width="10%" align="center">
											<img src="<%=path%>/images/img-5.gif" width="9" height="9" />
										</td>
										<td width="90%" align="left" class="lan12">
											<a
												href="<%=path%>/listYfSyslog.do?method=getYfSyslogPartialList"
												target="rhs" onClick="leftWidthSet()">登录日志</a>
										</td>
									</tr>
									<tr>
										<td width="10%" align="center">
											<img src="<%=path%>/images/img-5.gif" width="9" height="9" />
										</td>
										<td width="90%" align="left" class="lan12">
											<a
												href="<%=path%>//toAddSystemConfig.do?method=toAddSystemConfig"
												target="rhs" onClick="leftWidthSet()">预警时间设定</a>
										</td>
									</tr>
									<tr>
										<td width="10%" align="center">
											<img src="<%=path%>/images/img-5.gif" width="9" height="9" />
										</td>
										<td width="90%" align="left" class="lan12">
											<a
												href="<%=path%>/getProcessList.do?method=getProcessList"
												target="rhs" onClick="leftWidthSet()">流程查看</a>
										</td>
									</tr>
									<!-- <tr>
										<td width="10%" align="center">
											<img src="<%=path%>/images/img-5.gif" width="9" height="9" />
										</td>
										<td width="90%" align="left" class="lan12">
											<a
												href="<%=path%>/listSys.do?method=getSysPartialList&bussType=2"
												target="rhs" onClick="leftWidthSet()">系统备份</a>
										</td>
									</tr>
									<tr>
										<td width="10%" align="center">
											<img src="<%=path%>/images/img-5.gif" width="9" height="9" />
										</td>
										<td width="90%" align="left" class="lan12">
											<a
												href="<%=path%>/listSys.do?method=getSysPartialList&bussType=2"
												target="rhs" onClick="leftWidthSet()">系统恢复</a>
										</td>
									</tr> -->
								</table>
							</td>
						</tr>
					</table>
					<%
						}
					%>
					<%
						if (midtemp.equals("123412345")) {
						if(request.getParameter("ly")==null){
					out.println("<script>parent.main.location = '"+ path + "/listWorkItem.do?method=getWorkItemList'</script>");
					}
					%>
					<table width="100%" border="0" cellspacing="0" cellpadding="0"
						class="margb5">
						<tr onClick="showMenu('2');leftWidthSet()" style="cursor: hand">
							<td width="5" class="bgcolor">
								<img src="<%=path%>/images/img-6.gif" width="5" height="23" />
							</td>
							<td width="155" class="bgcolor qlan13b">
								我的工作台
							</td>
							<td width="20" align="center" class="bgcolor">
								<img id="menuImg2" src="<%=path%>/images/img-2.gif" width="8"
									height="11" />
							</td>
							<td width="5" class="bgcolor">
								<img src="<%=path%>/images/img-7.gif" width="5" height="23" />
							</td>
						</tr>
						<tr>
							<td colspan="4" class="bgcolor">
								<table id="menu2" width="100%" border="0" cellspacing="0"
									cellpadding="0" class="bgcolor1" style="display: ">
									<tr>
										<td width="10%" align="center">
											<img src="<%=path%>/images/img-5.gif" width="9" height="9" />
										</td>
										<td width="90%" align="left" class="lan12">
											<a href="<%=path%>/listWorkItem.do?method=getWorkItemList"
												target="rhs" onClick="leftWidthSet()">待办事宜</a>
										</td>
									</tr>
									<tr>
										<td width="10%" align="center">
											<img src="<%=path%>/images/img-5.gif" width="9" height="9" />
										</td>
										<td width="90%" align="left" class="lan12">
											<a
												href="<%=path%>/listWorkItemHis.do?method=getWorkItemHisList"
												target="rhs" onClick="leftWidthSet()">已办事宜</a>
										</td>
									</tr>
									<tr>
										<td width="10%" align="center">
											<img src="<%=path%>/images/img-5.gif" width="9" height="9" />
										</td>
										<td width="90%" align="left" class="lan12">
											<a
												href="<%=path%>/listNotice.do?&method=getNoticePartialList"
												target="rhs" onClick="leftWidthSet()">通知公告</a>
										</td>
									</tr>
									<tr>
										<td width="10%" align="center">
											<img src="<%=path%>/images/img-5.gif" width="9" height="9" />
										</td>
										<td width="90%" align="left" class="lan12">
											<a
												href="<%=path%>/listWarning.do?method=getWarningList"
												target="rhs" onClick="leftWidthSet()">任务预警</a>
										</td>
									</tr>
								</table>
							</td>
						</tr>
					</table>
					<%
						}
					%>
				</td>
			</tr>
		</table>
	</body>
	<script>
	var content=top.document.getElementById("content"); 
	function leftWidthSet(){
		if((document.body.scrollHeight-document.body.clientHeight)>0){
				content.cols = "205,*";
		}
		else{
			content.cols = "195,*";//
		}
	}
leftWidthSet();
</script>
</html>
